Intro To Probability
3. Conditional Probability and independence
(Gambler's Ruin)
Two gamblers, A and B, bet on the outcomes of successive flips of a coin. On each flip, if the coin comes up heads, A collects 1 unit from B, whereas if it comes up tails, A pays 1 unit to B. They continue to do this until one of them runs out of money. If its assumed that the successive flips of the coin are independent and each flip results in a head with probability p, what is the probability that A ends up with all the money if he starts with i units and B starts with
Let
where
since
now using the fact that
so finally
essentially when solving you should immediately recognize the need to solve for a recursive formula(just like you do for computational problems)